﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FMSpaceShooter.Screens;
using Microsoft.Xna.Framework;

namespace FMSpaceShooter.GameObjects.ItemFolder
{
    class ExplosionBulletBoost: BulletBoostBase
    {
        public const string imageName = "Images/Items/ExplosionBulletBoost";
        private double time = 0;
        private Vector2 trueSize;

        public ExplosionBulletBoost(GameplayScreen screen, Vector2 initialLocation)
            :base(screen, initialLocation, imageName)
        {
            position = initialLocation;
            trueSize = scale;
        }
        public override void Hit(int damage)
        {
            this.Die();
            ExplosiveBullet.increaseLevel();
        }



        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            time -= gameTime.ElapsedGameTime.Milliseconds;
            rotation += gameTime.ElapsedGameTime.Milliseconds;
            if (time < 0)
            {
                if (trueSize == scale)
                {
                    scale *= 1.25f;
                }
                else
                {
                    scale = trueSize;
                }
                time = 500;
            }

        }

    }
}
